From: Giovanni Campagna Date: Wed, 20 Feb 2013 16:20:46 +0000 (+0100) Subject: AppDisplay: fix allocation loop warnings X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4652 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=95602eb85d167c991575b9358e4d69eb23aa68a3;p=gnome-shell.git AppDisplay: fix allocation loop warnings Don't use a constraint to position the boxpointer horizontally. Instead, use the right alignment flags and let the layout managers do their job. https://bugzilla.gnome.org/show_bug.cgi?id=694284 --- diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 2b1bd9ad4..1120071c7 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -567,10 +567,6 @@ const FolderIcon = new Lang.Class({ this._popup = new AppFolderPopup(this, side); this._parentView.addFolderPopup(this._popup); - let constraint = new Clutter.AlignConstraint({ source: this._parentView.actor, - align_axis: Clutter.AlignAxis.X_AXIS, - factor: 0.5 }); - this._popup.actor.add_constraint(constraint); // Position the popup above or below the source icon if (side == St.Side.BOTTOM) { @@ -600,7 +596,17 @@ const AppFolderPopup = new Lang.Class({ this._isOpen = false; this.actor = new St.Widget({ layout_manager: new Clutter.BinLayout(), - visible: false }); + visible: false, + // We don't want to expand really, but look + // at the layout manager of our parent... + // + // DOUBLE HACK: if you set one, you automatically + // get the effect for the other direction too, so + // we need to set the y_align + x_expand: true, + y_expand: true, + x_align: Clutter.ActorAlign.CENTER, + y_align: Clutter.ActorAlign.START }); this._boxPointer = new BoxPointer.BoxPointer(this._arrowSide, { style_class: 'app-folder-popup-bin', x_fill: true,